<template>
    <div>
        <el-alert v-bind="opt"></el-alert>
    </div>
</template>

<script>

import { objectAssign } from "../../utils/common";

export default {
    name: "PopoWarn",
    props: {
        value: { type :String},
        item: {type: Object },
    },
    data() {
        return {
            mvalue: this.value,
            opt: {},
        };
    },
    watch:{
        mvalue( val){
            // this.$emit( "input", val);
        }
    },
    created(){
        // console.log( "input", this);
        var opt = objectAssign( {
            title: this.item.label,
            center: false,
            closable: false,
            type: "warning",
            showIcon: true,
        }, this.item.props);
        this.opt = opt;
    },
    methods: {}
};
</script>

<style scoped lang="scss">
::v-deep{
    .el-alert{
        margin: 20px auto;
    }
}
</style>
